<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateOtherPointsLogsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('other_points_logs', function (Blueprint $table) {
            $table->increments('id');
            $table->string('type',16);//积分获取类型
            $table->string('field',16);//字段类型
            $table->integer('acquire_id')->nullable();//获得用户
            $table->integer('integral');//积分
            $table->integer('source_id')->nullable();//来源id
            $table->text('remark')->nullable();
            $table->boolean('available')->default(true);//是否有效
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('other_points_logs');
    }
}
